home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 4
/
Precision Software Applications Silver Collection Volume 4 (1993).iso
/
database
/
sr_info.exe
/
DATES.PRG
< prev
next >
Wrap
Text File
|
1990-04-11
|
2KB
|
60 lines
***************************************************************************
** DATES.PRG
** A demonstration program provided by SUB ROSA PUBLISHING INC.
** (C) Copyright 1990, Sub Rosa Publishing Inc.
** This program may be copied freely. If it is used in commercial code,
** please credit the source, Sub Rosa Publishing Inc.
**
** DATES demonstrates the use of DATE( ) and the DAYS( ) functions
** to generate a wide variety of formated outputs and other information.
** DATES is compatible with all current versions of SR-Info and VP-Info.
**
** Bernie Melman
** April, 1990
**
***************************************************************************
SET raw off
IF :color <> 7
SET color to 31; white on blue
ENDIF
*
WINDOW ; set window to full screen
ERASE ; clear screen
? "Today's date in the default format is: ", date(7)
? "Today's date in format #1 is: ", date(1)
? "Today's date in format #2 is: ", date(2)
? "Today's date in format #3 is: ", date(3)
? "Today's date in format #4 is: ", date(4)
? "Today's date in format #5 is: ", date(5)
? "Today's date in format #6 is: ", date(6)
? "Today's date in format #8 is: ", date(8)
? "Today's date in format #9 is: ", date(9)
? "ONLY ",days(date(7),'01012000'),' days left in the 20th century'
*
?
string=blank(8)
DO WHILE t
? 'Enter a legal date in format MMDDYYYY'
ACCEPT 'Enter 01011900 to quit.... ' TO string
IF string='01011900'
BREAK
ENDIF
IF date(1,string)<>' ' ; a blank return means an illegal date
? "Selected date in format #1 is: ", date(1,string)
? "Selected date in format #2 is: ", date(2,string)
? "Selected date in format #3 is: ", date(3,string)
? "Selected date in format #4 is: ", date(4,string)
? "Selected date in format #5 is: ", date(5,string)
? "Selected date in format #6 is: ", date(6,string)
? "Selected date in format #8 is: ", date(8,string)
? "Selected date in format #9 is: ", date(9,string)
? "Number of days to Christmas, 2001 is:"
?? pic(days(string,"12\25\2001"),'999,999')
* note extra characters in date string above are ignored
ELSE
? "ILLEGAL DATE - please be more careful."
ENDIF
ENDDO
*
* *** end of DATES.PRG ***